import Vue from 'vue'
import axios from 'axios'
import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css'
import App from './App'
import store from './store'
import router from './router'
import './api/index'
import './permission'

Vue.use(ViewUI)
Vue.config.productionTip = false



axios.defaults.baseURL = window.location.origin

axios.interceptors.request.use(
    config => {
        config.headers['token'] = localStorage.getItem('token')
        return config;
    }
);
Vue.prototype.$http = axios;


new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App),
})
